package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *
 */
@Mapper
public interface OrderDetailMapper {
    /**
     * 批量插入订单明细数据
     * @param orderDetails
     */
     void insertBatch(List<OrderDetail> orderDetails);

    /**
     * 查询该订单对应的菜品/套餐明细
     * @param id
     * @return
     */
    @Select("select * from sky_take_out.order_detail where id=#{id}")
    List<OrderDetail> getByOrderId(Long id);

}
